import { distributorUpdate } from '@/api'

export default {
	state: {
		showInfo: false,
		formData: {}
	},
	getters: {},
	mutations: {
		SET_SHOW_INFO(state, value) {
			state.showInfo = value
		},
		INIT_FORM_DATA(state, data) {
			state.formData = data
		}
	},
	actions: {
		showUserForm({ commit }) {
			commit('SET_SHOW_INFO', true)
		},
		hideUserForm({ commit }) {
			commit('SET_SHOW_INFO', false)
		},
		initUserForm({ commit }, formData) {
			commit('INIT_FORM_DATA', formData)
		}
	}
}
